<template>
	<router-view />
</template>
<script>
import { getLibraryTypesByUser } from '@/api/platform/tbNetLibrary';
export default {
	async beforeRouteEnter(to, from, next) {
		let dataArr = [];
		let result = await getLibraryTypesByUser().then((res) => res.data);
		if (result.code === '0') {
			dataArr = result.data || [];
		}
		next((vm) => {
			vm.libraryList = dataArr;
		});
	},
	data() {
		return {
			libraryList: []
		};
	},
	provide() {
		return {
			libraryTypes: () => this.libraryList
		};
	}
};
</script>
